Issue 100 idempotency tests#195
Merged
Mac-5 merged 2 commits intoSynapse-bridgez:developfrom Feb 26, 2026
Merged
Conversation
Documented changes made to CI/CD processes, including code formatting, migration fixes, and clippy fixes. Listed remaining issues and next steps for further improvements.
- Implement full Redis-based idempotency logic in middleware - Add 8 comprehensive integration tests covering all requirements: * Duplicate request detection and cached response return * Concurrent request handling with 429 responses * TTL expiration and key cleanup * Cached response matching original * Different payload rejection with same key * Redis failure fallback (fail-open strategy) * No idempotency key pass-through * Valid idempotency key format handling - Fix never type fallback warnings with explicit type annotations - Add detailed test documentation in tests/README_IDEMPOTENCY.md - Tests verify behavior via Redis state inspection - All tests pass when Redis is available (1 passes without Redis) Resolves Synapse-bridgez#100
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces comprehensive integration tests to validate idempotency behavior across critical endpoints. The tests ensure repeated requests with the same idempotency key produce consistent responses without unintended side effects.closes #194